import request from '@/utils/request'

// 查询盘点明细列表
export function listCheckDetail(query) {
	query.orderByColumn = "create_time";
  return request({
    url: '/crm/checkDetail/list',
    method: 'get',
    params: query
  })
}

// 查询盘点明细详细
export function getCheckDetail(id) {
  return request({
    url: '/crm/checkDetail/' + id,
    method: 'get'
  })
}

// 新增盘点明细
export function addCheckDetail(data) {
  return request({
    url: '/crm/checkDetail',
    method: 'post',
    data: data
  })
}

// 新增盘点明细
export function saveCheckDetail(details,planId) {
  return request({
    url: '/crm/checkDetail/save?planId='+planId,
    method: 'post',
    data: details
  })
}

// 修改盘点明细
export function updateCheckDetail(data) {
  return request({
    url: '/crm/checkDetail',
    method: 'put',
    data: data
  })
}

// 删除盘点明细
export function delCheckDetail(id) {
  return request({
    url: '/crm/checkDetail/' + id,
    method: 'delete'
  })
}
